#include<iostream>
#include<vector>
#include<ctime>
using namespace std;

class Solution {
public:
    Solution(vector<int>& nums) {
       this->nums = nums; 
       this->origin_nums = nums;
    }
    
    /** Resets the array to its original configuration and return it. */
    vector<int> reset() {
        return this->origin_nums;
    }
    
    /** Returns a random shuffling of the array. */
    vector<int> shuffle() {
        // srand((int)time(NULL));
        int size = this->nums.size();
        for(int i = 0;i<size;i++){
            int index = rand()%size;
            //实现一组数字交换
            int temp = nums[i];
            nums[i] = nums[index];
            nums[index] = temp;
        }
        return this->nums;
    }
public:
    vector<int> nums;
    vector<int> origin_nums;
};

/**
 * Your Solution object will be instantiated and called as such:
 * Solution* obj = new Solution(nums);
 * vector<int> param_1 = obj->reset();
 * vector<int> param_2 = obj->shuffle();
 */

int main(){
    vector<int> V = {1,2,3};
    Solution S(V);
    vector<int> T = S.shuffle();
    vector<int> M = S.reset();
    system("pause");
 

}